package com.xml2db;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;

@Component
public class Dao {

	@Autowired
	private JdbcTemplate jdbcTemplate;

	/**
	 * 执行批量插入数据库
	 * 
	 * @param datas
	 * @author levy
	 */
	public void batchInsert(String insertSql, List<Object[]> datas) {
		jdbcTemplate.batchUpdate(insertSql, datas);
	}
}
